<!DOCTYPE html>
<html lang="en">
<head>
    <title>报告详情</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=4a6c1b54">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <script src="https://file.ggxqce.com/web/vue.min.js"></script>
    <style>
        .item {
            height: 170px;
            width: 100%;
            background: #fff;
            box-shadow: 0px 0px 1px grey;
        }

        .item .title {
            font-size: 14px;
            height: 40px;
            line-height: 40px;
            width: 100%;
            background: #f8f8f8;
        }

        .item .title i {
            height: 14px;
            width: 2px;
            float: left;
            margin-left: 20px;
            margin-right: 10px;
            margin-top: 13px;
            background: #4796e5;
        }

        .item img {
            float: left;
            margin-left: 10%;
            margin-right: 20px;
            margin-top: 30px;
        }

        .info {
            font-size: 14px;
            color: rgb(102, 102, 102);
            text-align: left;
            margin-top: 30px;
        }

        .info i {
            float: left;
            width: 5px;
            height: 5px;
            margin-left: 20px;
            margin-right: 10px;
            margin-top: 7px;
            background: #4796e5;
            border-radius: 50%;
        }

        .info .title {
            font-size: 18px;
            font-weight: bold;
            color: rgb(51, 51, 51)
        }

        .towTitle {
            margin: 10px 0;
        }

        .lookList {
            color: #228bee !important;
            font-weight: bold;
            cursor: pointer;
            position: absolute;
            bottom: 10px;
            right: 15px;
        }
    </style>
</head>
<body style="background: rgba(244, 246, 249, 1)">
<section class="content" id="app">
    <div class="row" v-cloak>
        <!--<div class="col-lg-3 col-xs-6">-->
        <!--&lt;!&ndash; small box &ndash;&gt;-->
        <!--<div class="item">-->
        <!--<img src="/dist/img/icon1.png" alt="">-->
        <!--<div class="info">-->
        <!--<div class="title">个人信息</div>-->
        <!--<div class="towTitle">新增通告（1）</div>-->
        <!--<div class="lookList" id="lookRs">查看</div>-->
        <!--</div>-->
        <!--</div>-->
        <!--</div>-->
        <!--&lt;!&ndash; ./col &ndash;&gt;-->
        <!--<div class="col-lg-3 col-xs-6">-->
        <!--<div class="item" >-->
        <!--<img src="/dist/img/icon2.png" alt="">-->
        <!--<div class="info" style="margin-top: 15px;">-->
        <!--<div class="title">考勤</div>-->
        <!--<div class="towTitle">今日签到信息</div>-->
        <!--<div class="towTitle">本月签到天数（20）</div>-->
        <!--<div class="towTitle">本月请假天数（1）</div>-->
        <!--<div class="lookList" @click="lookSign">查看</div>-->
        <!--</div>-->
        <!--</div>-->
        <!--</div>-->

        <div class="col-md-3"
             v-if="getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA'||getCurrentUser().roleName=='区域经理'||getCurrentUser().roleName=='大区经理'||getCurrentUser().roleName=='总经理'||getCurrentUser().roleName=='销售总监'||getCurrentUser().roleName=='区域总监'||getCurrentUser().roleName=='销售管理经理'||getCurrentUser().roleName=='区域支持'">
            <div class="item">
                <div class="title"><i></i>拜访客户(区域经理)</div>
                <div class="info" style=" margin-top: 22px;">
                    <div class="towTitle"><i></i>今日：目标（{{reportVisit.today.targetDay?reportVisit.today.targetDay:"0"}}），完成（{{reportVisit.today.finishDay?reportVisit.today.finishDay:"0"}}）
                    </div>
                    <div class="towTitle"><i></i>本月：目标（{{reportVisit.month.targetDay?reportVisit.month.targetDay:"0"}}），完成（{{reportVisit.month.finishDay?reportVisit.month.finishDay:"0"}}）
                    </div>
                </div>
                <div class="lookList" @click="lookInterview">查看</div>
            </div>
        </div>
        <div class="col-md-3 "
             v-if="getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA'||getCurrentUser().roleName=='大区经理'||getCurrentUser().roleName=='总经理'||getCurrentUser().roleName=='销售总监'||getCurrentUser().roleName=='区域总监'||getCurrentUser().roleName=='销售管理经理'||getCurrentUser().roleName=='区域支持'">
            <div class="item">
                <div class="title"><i></i>拜访客户(大区经理)</div>
                <div class="info" style=" margin-top: 22px;">
                    <div class="towTitle"><i></i>今日：大区（{{reportVisitBg.today.noAccompany?reportVisitBg.today.noAccompany:"0"}}），陪同（{{reportVisitBg.today.accompany?reportVisitBg.today.accompany:"0"}}）
                    </div>
                    <div class="towTitle"><i></i>本月：大区（{{reportVisitBg.month.noAccompany?reportVisitBg.month.noAccompany:"0"}}），陪同（{{reportVisitBg.month.accompany?reportVisitBg.month.accompany:"0"}}）
                    </div>
                </div>
                <div class="lookList" @click="lookInterviewAccompany">查看</div>
            </div>
        </div>
        <!--  <div class="col-md-3"
               v-if="getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA'||getCurrentUser().roleName=='区域经理'||getCurrentUser().roleName=='大区经理'||getCurrentUser().roleName=='总经理'||getCurrentUser().roleName=='销售总监'||getCurrentUser().roleName=='区域总监'||getCurrentUser().roleName=='销售管理经理'||getCurrentUser().roleName=='区域支持'">
              <div class="item">
                  <div class="title"><i></i>拜访客户(大客户经理)</div>
                  <div class="info" style=" margin-top: 22px;">
                      <div class="towTitle"><i></i>今日：目标（{{reportVisit.today.targetDay?reportVisit.today.targetDay:"0"}}），完成（{{reportVisit.today.finishDay?reportVisit.today.finishDay:"0"}}）
                      </div>
                      <div class="towTitle"><i></i>本月：目标（{{reportVisit.month.targetDay?reportVisit.month.targetDay:"0"}}），完成（{{reportVisit.month.finishDay?reportVisit.month.finishDay:"0"}}）
                      </div>
                  </div>
                  <div class="lookList" @click="lookInterviewce">查看</div>
              </div>
          </div>-->
        <div class="col-md-3 ">
            <div class="item">
                <div class="title"><i></i>考勤</div>
                <div class="info" style=" margin-top: 22px;">
                    <div class="towTitle"><i></i>今日：{{reportSignIn.isSignIn > 0 ? "已签到" : "未签到"}}</div>
                    <div class="towTitle"><i></i>本月：应出勤（{{reportSignIn.shouldCount}}），出&nbsp;&nbsp;&nbsp;勤（{{reportSignIn.signInCount}}）
                    </div>
                    <div class="towTitle" style="padding-left: 78px;">请&nbsp;&nbsp;&nbsp;假（{{reportSignIn.leaveCount}}），缺&nbsp;&nbsp;&nbsp;勤（{{reportSignIn.lackCount}}）</div>
                </div>
                <div class="lookList" @click="lookSignIn">查看</div>
            </div>
        </div>
        <div class="col-md-3">
            <div class="item">
                <div class="title"><i></i>微信转发</div>
                <div class="info" style=" margin-top: 22px;">
                    <div class="towTitle"><i></i>今日：应转发（{{reportShare.todayForward}}），已转发（{{reportShare.todayFinishForward}}）
                    </div>
                    <div class="towTitle"><i></i>本月：应转发（{{reportShare.monthForward}}）</div>
                    <div class="towTitle" style="padding-left: 78px;">已转发（{{reportShare.monthFinishForward}}）</div>
                </div>
                <div class="lookList" @click="lookWechatShare">查看</div>
            </div>
        </div>
    </div>
    <div class="row" v-cloak style="margin-top: 15px;">
        <div class="col-md-3"
             v-if="getCurrentUser().companyId== '201712161613432EAF27DBCCB7D0E6CA'||getCurrentUser().roleName=='大区经理'||getCurrentUser().roleName=='总经理'||getCurrentUser().roleName=='销售总监'||getCurrentUser().roleName=='销售管理经理'||getCurrentUser().roleName=='区域支持'">
            <div class="item">
                <div class="title"><i></i>人员情况</div>
                <div class="info" style=" margin-top: 22px;" v-if="getCurrentUser().companyId== '201712161613432EAF27DBCCB7D0E6CA'">
                    <!--  <div class="towTitle"><i></i>我的下属：标配（0），现有（0）</div>-->
                    <div class="towTitle"><i></i>今日入职<span style="color: #0c67b4" @click="lookEntry">（{{personnel.entryNumber}}）</span>
                    </div>
                    <div class="towTitle"><i></i>今日离职<span style="color: #0c67b4" @click="lookLeave">（{{personnel.leaveNumber}}）</span>
                    </div>
                </div>
                <div class="info" style=" margin-top: 22px;"
                     v-else-if="getCurrentUser().roleName=='总经理'||getCurrentUser().roleName=='销售总监'||getCurrentUser().roleName=='销售管理经理'||getCurrentUser().roleName=='区域支持'">
                    <div class="towTitle"><i></i>一线人员：标配（{{personnel.standard}}），现有（{{personnel.frontNumber}}）</div>
                    <div class="towTitle"><i></i>今日入职<span style="color: #0c67b4" @click="lookEntry">（{{personnel.entryNumber}}）</span>
                    </div>
                    <div class="towTitle"><i></i>今日离职<span style="color: #0c67b4" @click="lookLeave">（{{personnel.leaveNumber}}）</span>
                    </div>
                </div>
                <div class="info" style=" margin-top: 22px;" v-else-if="getCurrentUser().roleName=='大区经理'">
                    <div class="towTitle"><i></i>我的下属：标配（{{personnel.standard}}），现有（{{personnel.frontNumber}}）</div>
                    <div class="towTitle"><i></i>今日入职<span style="color: #0c67b4" @click="lookEntry">（{{personnel.entryNumber}}）</span>
                    </div>
                    <div class="towTitle"><i></i>今日离职<span style="color: #0c67b4" @click="lookLeave">（{{personnel.leaveNumber}}）</span>
                    </div>
                </div>
                <div class="lookList" @click="lookPersonnel">查看</div>
            </div>
        </div>
        <!--<div class="col-md-3" v-if="getCurrentUser().id == '2017121618514C22B68296F31AF8DDE2'||getCurrentUser().id == '201712171253420DBBFAE64C57F955B9'||getCurrentUser().id == '20180125095744209CA7B57B18576F6C'||getCurrentUser().id == '20171219122040B28198B030F64B7D37'">-->
        <!--<div class="item">-->
        <!--<div class="title"><i></i>资金日报</div>-->
        <!--<div class="info" style=" margin-top: 22px;">-->
        <!--<div class="towTitle"><i></i>昨日：可用现金余额 ({{reportFunds.yestdayMoney?fmoney(reportFunds.yestdayMoney):"-"}})</div>-->
        <!--<div class="towTitle"><i></i>今日：可用现金余额 ({{reportFunds.currentMoney?fmoney(reportFunds.currentMoney):"-"}})</div>-->
        <!--</div>-->
        <!--<div class="lookList" @click="lookFunsDay()">查看</div>-->
        <!--</div>-->
        <!--</div>-->
        <div class="col-md-3 "
             v-if="getCurrentUser().companyId== '201712161613432EAF27DBCCB7D0E6CA'||getCurrentUser().roleName=='大区经理'||getCurrentUser().roleName=='总经理'||getCurrentUser().roleName=='销售总监'||getCurrentUser().roleName=='销售管理经理'||getCurrentUser().roleName=='区域支持'">
            <div class="item">
                <div class="title"><i></i>展会</div>
                <div class="info" style=" margin-top: 22px;">
                    <div class="towTitle"><i></i>今年：总计（{{exhibition.exhibitionCount}}），已完成（{{exhibition.finishExhibition}}）
                    </div>
                    <div class="towTitle"><i></i>历史：已完成（{{exhibition.historyExhibition}}）</div>
                </div>
                <div class="lookList" @click="lookExhibition()">查看</div>
            </div>
        </div>


        <div class="col-md-3 ">
            <div class="item">
                <div class="title"><i></i>请假</div>
                <div class="info" style=" margin-top: 22px;">
                    <div class="towTitle"><i></i>今日：请假人次（{{reportLeave.dayLeaveCount}}）</div>
                    <div class="towTitle"><i></i>本月：请假人次（{{reportLeave.monthLeaveCount}}）</div>
                </div>
                <div class="lookList" @click="lookLeaveReport()">查看</div>
            </div>
        </div>
    </div>
    <!-- /.box-body -->
</section>
<!--JQ-->
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=602456c3"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=6348cbbc"></script>


<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript">
    var app = new Vue({
        el: '#app',
        data: {
            currentUser: getCurrentUser(),
            reportVisit: {"today": {}, "month": {}},
            reportVisitBg: {"today": {}, "month": {}},
            userId: getCurrentUser().id,
            time: "",
            personnel: {},
            exhibition: {},
            reportSignIn: [],
            reportShare: [],
            reportFunds: {},
            reportLeave: {}
        },
        methods: {
            fmoney: function (s, n) {
                n = n > 0 && n <= 20 ? n : 2;
                s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";
                var l = s.split(".")[0].split("").reverse(), r = s.split(".")[1],
                    t = "";
                for (i = 0; i < l.length; i++) {
                    t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
                }
                return t.split("").reverse().join("") + "." + r;
            },
            lookInterview: function () {
                var that = this;
                var xpwidth = window.screen.width - 10;
                var xpheight = window.screen.height - 35;
                if (getCurrentUser().companyId== "201712161613432EAF27DBCCB7D0E6CA") {
                    url = "reportForm/interview/companyList.html"
//                    window.open(url, '_blank', 'resizable=yes,directories=no,top=0,left=0,width='+xpwidth+',height=650');
                    top.addTabs({id: "bfbb-company", title: "拜访报表", close: true, url: url});
                }
                else if (getCurrentUser().roleName == "区域经理") {
                    url = "reportForm/interview/interviewTwo.html"
//                    window.open(url, "", "top=50,left=" + (window.screen.width - 10 - 1200) / 2 + ",width=1200,height=500");
                    top.addTabs({id: "bfbb-qy", title: "拜访报表", close: true, url: url});
                }
                else {
                    url = "reportForm/interview/interviewBig.html"
                    top.addTabs({id: "bfbb-big", title: "拜访报表", close: true, url: url});
//                    window.open(url, '_blank', 'resizable=yes,directories=no,top=0,left=0,width='+xpwidth+',height=650');
                }

            },
            lookInterviewce: function () {
                var that = this;
                var xpwidth = window.screen.width - 10;
                var xpheight = window.screen.height - 35;
                if (getCurrentUser().companyId== "201712161613432EAF27DBCCB7D0E6CA") {
                    url = "reportForm/interview/companyList2.html"
//                    window.open(url, '_blank', 'resizable=yes,directories=no,top=0,left=0,width='+xpwidth+',height=650');
                    top.addTabs({id: "bfbb-company", title: "拜访报表", close: true, url: url});
                }
                else if (getCurrentUser().roleName == "区域经理") {
                    url = "reportForm/interview/interviewTwo2.html"
//                    window.open(url, "", "top=50,left=" + (window.screen.width - 10 - 1200) / 2 + ",width=1200,height=500");
                    top.addTabs({id: "bfbb-qy", title: "拜访报表", close: true, url: url});
                }
                else {
                    url = "reportForm/interview/interviewBig2.html"
                    top.addTabs({id: "bfbb-big", title: "拜访报表", close: true, url: url});
//                    window.open(url, '_blank', 'resizable=yes,directories=no,top=0,left=0,width='+xpwidth+',height=650');
                }

            },
            lookInterviewAccompany: function () {
                var that = this;
                var xpwidth = window.screen.width - 10;
                var xpheight = window.screen.height - 35;
                if (getCurrentUser().companyId == "201712161613432EAF27DBCCB7D0E6CA") {
                    url = "reportForm/interview/groupAccompanyList.html"
//                    window.open(url, '_blank', 'resizable=yes,directories=no,top=0,left=0,width='+xpwidth+',height=650');
                    top.addTabs({id: "ptbfbb-company", title: "陪同拜访报表", close: true, url: url});
                }
                else {
                    url = "reportForm/interview/bigRegionAccompanyList.html"
                    top.addTabs({id: "ptbfbb-big", title: "陪同拜访报表", close: true, url: url});
//                    window.open(url, '_blank', 'resizable=yes,directories=no,top=0,left=0,width='+xpwidth+',height=650');
                }
            },
            lookEntry: function () {
                url = "/reportForm/personnel/entryList.html",
                    top.addTabs({
                        id: "personnel-10",
                        title: "入职人员信息",
                        close: true,
                        url: url
                    });
            },

            lookLeave: function () {
                url = "/reportForm/personnel/leaveList.html",
                    top.addTabs({
                        id: "personnel-11",
                        title: "离职人员信息",
                        close: true,
                        url: url
                    });
            },

            lookPersonnel: function () {
                if (getCurrentUser().roleName == "大区经理") {
                    url = "/reportForm/personnel/regionList.html"
                    top.addTabs({
                        id: "personnel-02",
                        title: "人员情况",
                        close: true,
                        url: url + '?departId=' + getCurrentUser().departId
                    });
                } else if (getCurrentUser().roleName == "区域支持") {
                    url = "/reportForm/personnel/supportList.html"
                    top.addTabs({id: "personnel-03", title: "人员情况", close: true, url: url});
                } else if (getCurrentUser().roleName == "销售管理经理" || getCurrentUser().roleName == "总经理" || getCurrentUser().roleName == "销售总监") {
                    url = "/reportForm/personnel/companyList.html"
                    top.addTabs({
                        id: "personnel-04",
                        title: "人员情况",
                        close: true,
                        url: url + '?companyId=' + getCurrentUser().companyId
                    });
                } else if (getCurrentUser().companyId== "201712161613432EAF27DBCCB7D0E6CA") {
                    url = "/reportForm/personnel/groupList.html"
                    top.addTabs({id: "personnel-05", title: "人员情况", close: true, url: url});
                }
                //window.open('/page/reportForm/personnel/companyList.html?id=' + id, "", "top=50,left=" + (window.screen.width - 10 - 900) / 2 + ",width=900,height=500");
            },
            lookSignIn: function () {
                var that = this;
                //获取跳转状态
                var gotoState = "";
                $.wyui.postMethod(urlConfig.system.signIn.getGotoSignIn, {
                    "userId": that.userId,
                }, function (data) {
                    gotoState = data.gotoState;
                }, true);

                if (getCurrentUser().roleName == "大区经理") {
                    url = "/reportForm/signIn/regionList.html?flag=0"
                    top.addTabs({id: "signIn-02", title: "考勤报表", close: true, url: url});
                } else if (getCurrentUser().roleName == "区域支持") {
                    url = "/reportForm/signIn/supportList.html?flag=0"
                    top.addTabs({id: "signIn-03", title: "考勤报表", close: true, url: url});
                } else if (getCurrentUser().roleName == "销售管理经理" || getCurrentUser().roleName == "人事专员" || getCurrentUser().roleName == "人事经理"|| getCurrentUser().roleName == "总经理" || getCurrentUser().roleName == "销售总监") {
                    url = "/reportForm/signIn/departList.html?flag=0"
                    top.addTabs({id: "signIn-04", title: "考勤报表", close: true, url: url});
                } else if (getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA') {
                    url = "/reportForm/signIn/companyList.html?flag=0"
                    top.addTabs({id: "signIn-05", title: "考勤报表", close: true, url: url});
                } else if (gotoState == "0") {
                    //无下级
                    url = "/reportForm/signIn/detail.html?flag=0"
                    top.addTabs({id: "signIn-01", title: "考勤报表", close: true, url: url});
                }
            },
            lookWechatShare: function () {
                var that = this;
                if (getCurrentUser().roleName == "区域经理") {
                    url = "/reportForm/wechatshare/detail.html?flag=0"
                    top.addTabs({id: "wechatshare-01", title: "微信转发", close: true, url: url});
                } else if (getCurrentUser().roleName == "大区经理") {
                    url = "/reportForm/wechatshare/regionList.html?flag=0"
                    top.addTabs({id: "wechatshare-02", title: "微信转发", close: true, url: url});
                } else if (getCurrentUser().roleName == "区域支持") {
                    url = "/reportForm/wechatshare/supportList.html?flag=0"
                    top.addTabs({id: "wechatshare-03", title: "微信转发", close: true, url: url});
                } else if (getCurrentUser().roleName == "销售管理经理" || getCurrentUser().roleName == "总经理" || getCurrentUser().roleName == "销售总监"|| getCurrentUser().roleName == "区域总监") {
                    url = "/reportForm/wechatshare/salerManagerList.html?flag=0"
                    top.addTabs({id: "wechatshare-04", title: "微信转发", close: true, url: url});
                } else if (getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA') {
                    url = "/reportForm/wechatshare/companyList.html?flag=0"
                    top.addTabs({id: "wechatshare-04", title: "微信转发", close: true, url: url});
                }
            },
            lookCustomer: function () {
                if (getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA') {
                    url = "reportForm/customer/companyList.html";
//                    window.open(url, '_blank', 'resizable=yes,directories=no,top=0,left=0,width='+xpwidth+',height=650');
                    top.addTabs({id: "khbb-company", title: "客户报表", close: true, url: url});
                }
                else {
                    url = "reportForm/interview/bigRegionAccompanyList.html"
                    top.addTabs({id: "ptbfbb-big", title: "陪同拜访报表", close: true, url: url});
//                    window.open(url, '_blank', 'resizable=yes,directories=no,top=0,left=0,width='+xpwidth+',height=650');
                }
            },
            lookExhibition: function () {
                if (getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA') {
                    url = "reportForm/exhibition/groupList.html";
//                    window.open(url, '_blank', 'resizable=yes,directories=no,top=0,left=0,width='+xpwidth+',height=650');
                    top.addTabs({id: "zh-group", title: "集团展会报表", close: true, url: url});
                }
                else {
                    url = "reportForm/exhibition/companyList.html" + "?companyId=" + getCurrentUser().companyId;
                    top.addTabs({id: "ptbfbb-big", title: "公司展会报表", close: true, url: url});
//                    window.open(url, '_blank', 'resizable=yes,directories=no,top=0,left=0,width='+xpwidth+',height=650');
                }

            },
            lookFunsDay: function () {
                url = "reportForm/capital/reportCompany.html";
                top.addTabs({id: "zjrb-company", title: "资金日报", close: true, url: url});
            },
            lookLeaveReport: function () {
                //获取跳转状态
                var gotoState = "";
                $.wyui.postMethod(urlConfig.system.signIn.getGotoSignIn, {
                    "userId": getCurrentUser().id,
                }, function (data) {
                    gotoState = data.gotoState;
                }, true);
                if (getCurrentUser().roleName == "区域支持") {
                    url = "/reportForm/leave/supportLeaveList.html?flag=0"
                    top.addTabs({id: "leave-03", title: "请假报表", close: true, url: url});
                } else if (getCurrentUser().roleName == "区域经理" || gotoState == "0") {
                    url = "/reportForm/leave/regionLeaveList.html?flag=0"
                    top.addTabs({id: "leave-01", title: "请假报表", close: true, url: url});
                } else if (getCurrentUser().roleName == "大区经理") {
                    url = "/reportForm/leave/bigRegionPersonList.html?flag=0"
                    top.addTabs({id: "leave-02", title: "请假报表", close: true, url: url});
                } else if (getCurrentUser().roleName == "销售管理经理" || getCurrentUser().roleName == "总经理" || getCurrentUser().roleName == "销售总监") {
                    url = "/reportForm/leave/companyPersonList.html?flag=0"
                    top.addTabs({id: "leave-04", title: "请假报表", close: true, url: url});
                } else if (getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA') {
                    url = "reportForm/leave/companyList.html?flag=0";
                    top.addTabs({id: "leave-05", title: "请假报表", close: true, url: url});
                } else {
                    url = "/reportForm/leave/superiorList.html?flag=0"
                    top.addTabs({id: "leave-06", title: "请假报表", close: true, url: url});
                }
            }
        },
        mounted: function () {
            console.log(getCurrentUser().roleName)
            var that = this;
            var userId = getCurrentUser().id;
            var data = "";
            var personnel = "";
            var leaveData = "";
            var exhibition = "";
            if (getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA') {
                exhibition = {}
            } else {
                exhibition = {"companyId": getCurrentUser().companyId}
            }
            $.wyui.postMethod("/exhibition/getExhibitionByCard.json", exhibition, function (map) {
                console.log(map);
                that.exhibition = map;
            });
            if (getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA') {
                data = {"companyId": getCurrentUser().companyId, "type": "1"}
            } else if (getCurrentUser().roleName == "区域经理") {
                data = {"userId": getCurrentUser().id, "type": "3"}
            } else {
                data = {"companyId": getCurrentUser().companyId, "type": "2"}
            }
            if (getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA') {
                personnel = {"type": "1"}
            } else if (getCurrentUser().roleName == "大区经理") {
                personnel = {"userId": getCurrentUser().id, "departId": getCurrentUser().departId, "type": "3"}
            } else {
                personnel = {"companyId": getCurrentUser().companyId, "type": "2"}
            }

            //获取跳转状态
            var gotoState = "";
            $.wyui.postMethod(urlConfig.system.signIn.getGotoSignIn, {
                "userId": getCurrentUser().id,
            }, function (data) {
                gotoState = data.gotoState;
            }, true);
            if (getCurrentUser().roleName == "区域经理" || gotoState == "0") {
                leaveData = {"userId": getCurrentUser().id};
            } else if (getCurrentUser().roleName == "大区经理") {
                leaveData = {"departId": getCurrentUser().departId};
            } else if (getCurrentUser().roleName == "区域支持") {
                leaveData = {"supportId": getCurrentUser().id};
            } else if (getCurrentUser().roleName == "销售管理经理" || getCurrentUser().roleName == "总经理" || getCurrentUser().roleName == "销售总监" ) {
                leaveData = {"companyId": getCurrentUser().companyId};
            } else if (getCurrentUser().companyId=='201712161613432EAF27DBCCB7D0E6CA') {
                leaveData = {"groupId": "0"};
            } else {
                leaveData = {"superiorId": getCurrentUser().id};
            }
            $.wyui.postMethod(urlConfig.crm.personnel.getByUserId, personnel, function (map) {
                console.log(map);
                that.personnel = map;
            });
            $.wyui.postMethod(urlConfig.crm.customer.reportVisitByUserId, data, function (map) {
                console.log(map);
                that.reportVisit = map;
            });
            $.wyui.postMethod(urlConfig.crm.customer.getByUserIdDQ, data, function (map) {
                console.log(map);
                that.reportVisitBg = map;
            });
            that.time = new Date().Format("yyyy-MM");//本月
            $.wyui.postMethod(urlConfig.system.signIn.getSignInByUserId, {
                "userId": userId,
                "signInMonth": that.time
            }, function (data) {
                console.log(data);
                that.reportSignIn = data;
            });
            $.wyui.postMethod(urlConfig.system.wechatShare.getWechatShareTotal, {
                "userId": userId,
                "shareMonth": that.time
            }, function (data) {
                that.reportShare = data;
            });
//            $.wyui.postMethod(urlConfig.capital.reportCapital.getFundsTotal, null, function (data) {
//                that.reportFunds = data;
//            });
            $.wyui.postMethod(urlConfig.system.leavel.getLeaveInfo, leaveData, function (data) {
                that.reportLeave = data;
            });
        }
    });
</script>

</body>
</html>